package demo.practice.bfs;

public class P52 {

    int count;

    public int totalNQueens(int n) {
        count = 0;
        if (n <= 0) {
            return 0;
        }

        boolean[][] visited = new boolean[n][n];

        int i = 0;
        int j = 0;

        while (i < n) {

            if (check(visited, i, j)) {
                visited[i][j] = true;
                i++;
            } else {
                if (j < n) {
                    j++;
                } else {
                    i--;
                }
            }
        }


        return count;
    }

//    private void dfs(boolean[][] visited, int i, int j, int tmpcount) {
//        if(visited[i][j]|| !check(visited,i,j)){
//            return;
//        }
//
//
//
//    }

    private boolean check(boolean[][] visited, int i, int j) {
        return true;
    }
}
